; https://github.com/DomGries/InnoDependencyInstaller


; requires dxwebsetup.exe (see CodeDependencies.iss)
; #define public Dependency_Path_DirectX "dependencies\"

; #include "CodeDependencies.iss"

[Setup]
#define MyAppSetupName 'HiprintInstaller'
#define MyAppVersion '1.0'
#define MyAppPublisher 'Hiprint Setup'
#define MyAppCopyright 'Copyright © Boaway'
#define MyAppURL 'https://jrsoftware.org/isinfo.php'
#define APPExeName 'hiprint.exe'
#define APPExeMainName 'hiprint'

AppName={#APPExeMainName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppSetupName} {#MyAppVersion}
AppCopyright={#MyAppCopyright}
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany={#MyAppPublisher}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}
DefaultGroupName={#APPExeMainName}
DefaultDirName={autopf}\{#APPExeMainName}
UninstallDisplayIcon={app}\MyProgram.exe
OutputDir={#SourcePath}\bin
AllowNoIcons=yes
PrivilegesRequired=admin
; 修复杀毒软件误报问题
Compression=lzma

; remove next line if you only deploy 32-bit binaries and dependencies
ArchitecturesInstallIn64BitMode=x64

[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: fr; MessagesFile: "compiler:Languages\French.isl"
Name: it; MessagesFile: "compiler:Languages\Italian.isl"
Name: de; MessagesFile: "compiler:Languages\German.isl"
Name: es; MessagesFile: "compiler:Languages\Spanish.isl"
; 添加中文简体 http://www.jrsoftware.org/files/istrans/
Name: cn; MessagesFile: "compiler:Languages\Chinese.isl"


[Files]
; Source: "example\MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Dependency_IsX64; Flags: ignoreversion
; Source: "example\MyProg.exe"; DestDir: "{app}"; Check: not Dependency_IsX64; Flags: ignoreversion
; Source: "C:\Users\ives\Desktop\WhiteBoard\BlackBoardFramework\BlackBoard\bin\BlackBoard-202409241623\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\Source\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; Source: "Install.ini"; DestDir: "{app}";  Flags: ignoreversion


[Icons]
Name: "{group}\{#MyAppSetupName}"; Filename: "{app}\{#APPExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppSetupName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#APPExeName}"; Filename: "{app}\{#APPExeName}"; Tasks: desktopicon

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"

[Run]
Filename: "{app}\{#APPExeName}"; Description: "{cm:LaunchProgram,{#APPExeMainName}}"; Flags: nowait postinstall skipifsilent

[Registry]
; 注册URL协议
Root: HKCR; Subkey: "{#APPExeMainName}"; ValueType: "string"; ValueData: "URL:{#APPExeMainName} Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "{#APPExeMainName}"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "{#APPExeMainName}\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#APPExeMainName},0"
Root: HKCR; Subkey: "{#APPExeMainName}\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#APPExeMainName}"" "

[Code]
function InitializeSetup: Boolean;
var IniFilePath: String;
begin


  Result := True;
end;

